<?php
if ($this->session->userdata('logged_in') == TRUE) {
    $this->load->view('view_login_success');
}
?>
<?php $this->load->view('view_pageheader'); ?>
<label class="content_linkBack"><a onClick='window.history.go(-1)'>< Back</a></label>
<label class="content_this">| NEW GROUP-PERSON & GROUP-MENU CONTROL</label>
    
<?php echo form_open('con_users/Editcontrol'); ?>
    <?php foreach ($data1 as $show) { ?>
        <table border="0" style="margin: auto;">
            <tr>
                <td><label class="textRight">GROUP-PERSON NAME :</label></td>
                <td>
                    <?php echo $show->gperson_name;?>
                    <input type="hidden" name="gpersonid" value="<?php echo $show->gperson_id; ?>" />
                </td>
            </tr>
            <?php 
            foreach ( $qry_group as $row ) { ?>
            <tr>
                <td></td>
                <td>                    
                    <?php 
                    foreach ( $qry_chkgroup as $rows ) {                          
                            if(($rows->gmenu_id)==($row->gmenu_id)) {
                                echo '<input type="checkbox" name="gmenu_id[]" id="gmenu_id" checked="checked" value="' . $row->gmenu_id . '" />' . $row->gmenu_name . '';
                                continue 2;
                            }
                            else {    
                                continue 1;
                            }
                    }  
                    echo '<input type="checkbox" name="gmenu_id[]" id="gmenu_id" value="' . $row->gmenu_id . '" />' . $row->gmenu_name . '';
                    ?>
                </td>
            </tr>
            <?php } ?>
            <tr>
                <td><label class="textRight">Active :</label></td>
                <td>
                <label>
                    <select name="active" id="active">
                        <option value="1">Yes</option>
                        <option value="0">No</option>
                    </select>
                </label>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: center;">
                    <input type="submit" value="Submit" />&nbsp;<input type="reset" value="Cancel" />
                </td>
            </tr>
        </table>
   <?php } ?>
<?php echo form_close(); ?>
    
<?php $this->load->view('view_pagefooter'); ?>
   